package edu.sctu.zcy.month201505.day20150520;

/**
 * Created by user24 on 2015/5/20.
 */
public class MainStudent {



    public static void main(String[] args) {

        SetInfo setInfo = new SetInfo();

        TeaCher[] teaChers = setInfo.setTeacher1();
//        TeaCher[] teaChers1;
//        Student[] students;

        TextOne textOne = new TextOne(teaChers);
        textOne.getTeacher();
//        students = textOne.sortStudent();
//        for (int i = 0; i < students.length; i++) {
//            System.out.println(students[i].getName());
//        }

//        teaChers1 = textOne.pritCoded();
//
//        for (int i = 0; i < teaChers1.length; i++) {
//            if(teaChers1[i] != null) {
//                System.out.println(teaChers1[i].getTechnicalTitle());
//            }
//        }

        textOne.getCode(new InterFaceStudent() {
            @Override
            public void print(Student[] students) {
                Student[] student = textOne.getStudent(60,students);

                   for (Student stu : student) {
                       if (stu!=null) {
                       System.out.println("姓名：" + stu.getName());
                   }

               }
            }
        });

        //每次调用的时候都是从新申请的数组来接收，所以新申请的数组可能有空值，所以运用时必须判断是否为空！



    }
}
